Visual Basic (Declaration) | |
---|---|
Public Function New( _ ByVal storage As IDictionary(Of TKey,TValue), _ ByVal locking As ILockStrategy _ ) |
C# | |
---|---|
public SynchronizedDictionary<TKey,TValue>( IDictionary<TKey,TValue> storage, ILockStrategy locking ) |
Parameters
- storage
- locking
Library/Library.Test/TestSynchronizedCollections.cs
C# | Copy Code |
---|---|
SynchronizedDictionary<string, string> test = new SynchronizedDictionary<string, string>(new Dictionary<string,string>(), new IgnoreLocking()); test["a"] = "b"; string all = String.Join("", new List<string>(test.Keys).ToArray()); Assert.AreEqual("a", all); |
VB.NET | Copy Code |
---|---|
Dim test As New SynchronizedDictionary(Of String, String)(New Dictionary(Of String, String)(), New IgnoreLocking()) test("a") = "b" Dim all As String = [String].Join("", New List(Of String)(test.Keys).ToArray()) Assert.AreEqual("a", all) |
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7